#!/usr/bin/env python

import wx
import wx.lib.mixins.listctrl as listmix

class ListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin):
    '''ListCtrl enchanced with auto width.
    
    Usage:
        ListCtrl.SetColumnWidth([Column], wx.LIST_AUTOSIZE)
    
    @author Julot <andy.julot@gmail.com>
    @since Thursday, February 16, 2012. 06:52 PM'''
    
    def __init__(self, parent, id=-1, pos=wx.DefaultPosition,
                 size=wx.DefaultSize, style=wx.LC_ICON,
                 validator=wx.DefaultValidator, name=wx.ListCtrlNameStr):
        wx.ListCtrl.__init__(self, parent, id, pos, size, style, validator,
                             name)
        # Activate auto size.
        listmix.ListCtrlAutoWidthMixin.__init__(self)
    